package com.jams.goodox.net.services;

import com.jams.goodox.constant.UrlConstants;
import com.jams.goodox.entity.resp.NeighborCommentsResp;
import com.jams.goodox.entity.resp.NeighborDetailResp;
import com.jams.goodox.entity.resp.UserLisResp;
import com.jams.goodox.net.BaseEntity;

import retrofit2.Call;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by jams on 2017/5/5.
 * ***
 * Tel: ***
 */

public interface RentingService {
    //获取加入列表
    @GET(UrlConstants.getPraiseList)
    Call<UserLisResp> getJoinList(@Path("modelType") String modelType, @Path("id") String id, @Query("curPage") int curPage, @Query("pageSize") int pageSize);

    //评论
    @FormUrlEncoded
    @POST(UrlConstants.neighborComment)
    Call<BaseEntity> comment(@Path("modelType") String modelType, @Path("id") String id, @Field("msgId") String msgId, @Field("msgContent") String msgContent, @Field("toUserId") String toUserId
            , @Field("type") String type);

    //获取详情页
    @GET(UrlConstants.getNeighborDetail)
    Call<NeighborDetailResp> getNeighborDetail(@Path("id") String neighborId);

    //点赞、取消点赞、报名、取消报名
    @FormUrlEncoded
    @POST(UrlConstants.praise)
    Call<BaseEntity> praise(@Path("id") String id, @Field("active") int active);

    //删除评论
    @DELETE(UrlConstants.neighborCommentDel)
    Call<BaseEntity> delComment(@Path("id") String id);

    //删除邻里记录
    @DELETE(UrlConstants.deleteNeighborDynamic)
    Call<BaseEntity> delCircle(@Path("id") String id);

    //获取邻里详情评论列表
    @GET(UrlConstants.getNeighborComment)
    Call<NeighborCommentsResp> getNeighborComments(@Path("id") String id, @Query("curPage") int curPage, @Query("pageSize") int pageSize);

}
